<template>
	<view class="practice_box">
		<view class="container">
			<view class="practice_item" style="padding-top: 30rpx;">
				<view class="title">专项训练</view>
				<view class="box flex_ac_jc">
					<view class="item" @tap="goToPage('/pages/practices/wordChoice/wordChoice')">
						<image src="@/static/images/practice/practice_item1.svg" mode="aspectFit"></image>
						<view class="text">听写训练</view>
					</view>
					<view class="item" @tap="goToPage()">
						<image src="@/static/images/practice/practice_item2.svg" mode="aspectFit"></image>
						<view class="text">拼写训练</view>
					</view>
					<view class="item" @tap="goToPage()">
						<image src="@/static/images/practice/practice_item3.svg" mode="aspectFit"></image>
						<view class="text">英文选义</view>
					</view>
					<view class="item" @tap="goToPage()">
						<image src="@/static/images/practice/practice_item4.svg" mode="aspectFit"></image>
						<view class="text">中文选词</view>
					</view>
					<view class="item" @tap="goToPage()">
						<image src="@/static/images/practice/practice_item5.svg" mode="aspectFit"></image>
						<view class="text">选词填空</view>
					</view>
					<view class="item" @tap="goToPage()">
						<image src="@/static/images/practice/practice_item6.svg" mode="aspectFit"></image>
						<view class="text">听音选义</view>
					</view>
				</view>
			</view>
			<view class="practice_item">
				<view class="title">单词游戏</view>
				<view class="box flex_ac_jc">
					<view class="item" @tap="goToPage('/pages/practices/rightRightTouch/rightRightTouch')">
						<image src="@/static/images/practice/practice_item7.svg" mode="aspectFit"></image>
						<view class="text">单词对对碰</view>
					</view>
					<view class="item" @tap="goToPage()">
						<image src="@/static/images/practice/practice_item8.svg" mode="aspectFit"></image>
						<view class="text">拼写闯关</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			goToPage(url) {
				if (url) {
					uni.navigateTo({
						url
					})
				} else {
					uni.showToast({
						title: '功能正在开发...',
						icon: 'none'
					})
				}
				
			}
		}
	}
</script>

<style lang="scss" scoped>
.practice_box {
	height: 100vh;
	padding: 80rpx 30rpx 50rpx;
	background: $uni-bg-color-page;
	overflow: hidden;
	
	.container {
		height: 100%;
		background-color: $uni-bg-color;
		border-radius: 10rpx;
		
		.practice_item {
			margin-bottom: 20rpx;
			
			.title {
				width: 160rpx;
				height: 50rpx;
				line-height: 50rpx;
				text-align: center;
				background-color: #83b554;
				color: $uni-bg-color;
				border-radius: 0 10rpx 10rpx 0;
				font-size: 28rpx;
				margin-bottom: 30rpx;
			}
			
			.box {
				flex-wrap: wrap;
				padding: 0 30rpx;
				
				.item {
					width: 240rpx;
					text-align: center;
					background-color: #0000ff4a;
					border-radius: 8rpx;
					padding: 20rpx;
					margin-bottom: 40rpx;
					
					image {
						width: 58rpx;
						height: 58rpx;
					}
					
					.text {
						margin-top: 10rpx;
						color: $uni-text-color-placeholder;
						font-size: 28rpx;
					}
				}
				
				.item:nth-child(2n) {
					margin-left: 60rpx;
				}
			}
		}
	}
}
</style>
